$(function(){
	$("#myfile").live('change',function(){
		alert("ok");
		  $.ajaxFileUpload
            (
                {
                    url: 'fileuploadservlet', 
                    secureuri: false, 
                    fileElementId: 'myfile',
                    dataType: 'JSON', 
                    success: function (data, status)  
                    {
                        alert("ok");
                    },
                    error: function (data, status, e)
                    {
                        alert("sorry");
                    }
                }
            )
	});
});